/*
 *  Copyright 2013-2015 www.snakerflow.com.
 *  *
 *  * Licensed under the Apache License, Version 2.0 (the "License");
 *  * you may not use this file except in compliance with the License.
 *  * You may obtain a copy of the License at
 *  *
 *  *     http://www.apache.org/licenses/LICENSE-2.0
 *  *
 *  * Unless required by applicable law or agreed to in writing, software
 *  * distributed under the License is distributed on an "AS IS" BASIS,
 *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  * See the License for the specific language governing permissions and
 *  * limitations under the License.
 *
 */

package org.snaker.engine.model;

import java.util.HashMap;
import java.util.Map;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 字段模型类
 * 
 * @author yuqs
 * @since 2.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class FieldModel extends BaseModel {
    private static final long serialVersionUID = -3439646328045814844L;
    private String type; // 字段类型
    private Map<String, String> attrMap = new HashMap<String, String>(); // 字段模型对应的属性key/value数据

    /**
     * 向属性集合添加key/value数据
     * 
     * @param name
     *            属性名称
     * @param value
     *            属性值
     */
    public void addAttr(String name, String value) {
        this.attrMap.put(name, value);
    }
}
